<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core" 
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:fhj="http://java.sun.com/jsf/composite/fhj">
<h:head>
	<title>${pageTitle}</title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- 	<h:outputStylesheet name="css/main.css" /> -->
</h:head>
<h:body>
	<p:layout fullPage="true">
		<p:layoutUnit position="north" size="60">
			Hello SWD11 Portal! <br />
			<h:link id="userNameLoggedIn" value="#{userBean.loggedIn}" outcome="login"  rendered="#{userBean.isLoggedIn()}" />
			<h:link value="Login" outcome="login"  rendered="#{userBean.isLoggedIn()!=true}" />
		</p:layoutUnit>
		<p:layoutUnit position="west" size="200" collapsible="true" header="Menu">
			<h:form>
				<p:menu>
					<p:submenu label="Communities">
						<p:menuitem value="List communities" action="communities" ajax="false" />
						<p:menuitem value="Create community" action="newcommunity" ajax="false" />
					</p:submenu>
					<p:submenu label="User">
						<p:menuitem value="List user" action="userlist" ajax="false" />
						<p:menuitem id="editOwnProfile" value="Edit own profile" action="profile_edit" ajax="false" />
					</p:submenu>
					<p:submenu label="Administration" rendered="#{userBean.activeUser.admin}">
						<p:menuitem value="List news" action="news" ajax="false" />
						<p:menuitem id="releaseCommunities" value="Release communities" action="releaseCommunities" ajax="false" />
					</p:submenu>
				</p:menu>
			</h:form>
		</p:layoutUnit>
		<p:layoutUnit position="east" size="300" collapsible="true" header="Aktivitäten">
			<fhj:activityStream />
		</p:layoutUnit>
		<p:layoutUnit position="center" header="${pageTitle}">
			<ui:insert name="content">
				[Template content will be inserted here]
			</ui:insert>
		</p:layoutUnit>
	</p:layout>
</h:body>
</html>
